<template>
    <div class="index">
      <div class="content">
        <keep-alive><!--keep-alive保存组件的路由动态，keepAlive为true保存动态，为false不保存动态-->
        <router-view v-if="this.$route.meta.keepAlive"></router-view>
    </keep-alive>
     <router-view v-if="!this.$route.meta.keepAlive"></router-view>
      </div>
      <Footer></Footer>
    </div>
</template>

<script>
  import Footer from "./Footer";
    export default {
        name: "Index",
        components: {Footer}
    }
</script>


<style lang="scss" scoped>
  body,html,.index{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-size: 0.16rem;
    line-height: 0.2rem;
    .content{
      width: 100%;
      flex: 1;
      overflow: hidden;
    }
  }
</style>
